var batch_volume=0,total_volume=0,fermentation_period=18,yield_ratio=0.85;
var capacity_day=0,capacity_month=0,capacity_year=0;

function capacity(){
    batch_volume=Number(document.capacity_calculator.batch_volume.value);
    total_volume=Number(document.capacity_calculator.total_volume.value);
    fermentation_period=Number(document.capacity_calculator.fermentation_period.value);
    yield_ratio=Number(document.capacity_calculator.yield_ratio.value);
    var capacity_day=total_volume/fermentation_period*yield_ratio;
    document.capacity_calculator.capacity_day.value=String(Math.round(capacity_day))+'L';
    document.capacity_calculator.capacity_month.value=String(Math.round(capacity_day*30))+'L';
    document.capacity_calculator.capacity_year.value=String(Math.round(capacity_day*365))+'L';
    document.capacity_calculator.cooling_capacity.value='>'+String((batch_volume*0.02).toFixed(2));
    document.capacity_calculator.cooling_power.value='>'+String((batch_volume*0.011).toFixed(2));
    document.capacity_calculator.steam_power.value='>'+String((batch_volume*0.115).toFixed(2));
}
